package com.tan.common.enums;

import cn.hutool.core.util.ObjectUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Tan
 * @description
 * @date 2025/1/27
 */
@Getter
@AllArgsConstructor
public enum MessageTypeEnum {

    /**
     *
     */
    PRIVATE_CHAT("私聊消息", "private_chat"),

    GROUP_CHAT("群消息", "group_chat");

    private final String title;
    private final String code;

    public static boolean eq(MessageTypeEnum msg, String code) {
        return ObjectUtil.equal(msg.getCode(), code);
    }

    public boolean eq(String code) {
        return ObjectUtil.equal(this.code, code);
    }
}
